import React,{Component} from 'react'
import  { Suspense } from 'react';
import { Layout, Menu, Dropdown, Avatar } from 'antd';
import { Route, Switch ,Redirect} from 'react-router-dom';

import SeoContainer from '&components/seo-container';
import Header from '&widgets/header';
import NewSider from '&widgets/newSider'

import styles from './styles.module.less';
import { Tabs } from 'antd';


import EquipmentMsg from '../home/equipmentMessage/index'
import Residuas from '../home/equipmentMessage/Residuas'
import Averagec from '../home/equipmentMessage/Averagec'
import CorrosionRate from '../home/equipmentMessage/corrosionRate'
import WthickLoss from '../home/equipmentMessage/WallThicknessLoss'
import hotMap from '../home/admin/hotmaps'
const { TabPane } = Tabs;

const { Content } = Layout;
const initialPanes = [
    { title: 'Tab 1', content: 'Content of Tab 1', key: '1' },
    { title: 'Tab 2', content: 'Content of Tab 2', key: '2' },
    {
      title: 'Tab 3',
      content: 'Content of Tab 3',
      key: '3',
      closable: false,
    },
  ];

function Equipment(){
    return (
        <SeoContainer title="设备信息">
            <Layout>
                <NewSider />
                <Layout>
                    <Header/>
                    {/* <Route path="/admin/?id=1" component={Equipment}/> */}
                    <Content>
                        <div className={ styles.interviewArticle }>
                            {/* <Suspense fallback={<div>loading</div>}> */}
                                <Switch>
                                <Route path="/equipment/hotMap" component={hotMap}/>
                                <Route path="/equipment/equipmentMsg" component={EquipmentMsg}/>
                                <Route path="/equipment/residuas" component={Residuas}/>
                                <Route path="/equipment/averagec" component={Averagec}/>
                                <Route path="/equipment/corrosionRate" component={CorrosionRate}/>
                                <Route path="/equipment/WallThicknessLoss" component={WthickLoss}/>

                                    {/* <Route path="/admin/member-list"  render={()=>{
                                        return (<Tabs
                                            type="editable-card"
                                            // onChange={this.onChange}
                                            // activeKey={activeKey}
                                            // onEdit={this.onEdit}
                                          >
                                            {
                                              <TabPane tab={"MemberList"}>
                                                {React.createElement(MemberList)}
                                              </TabPane>
                                            }
                                          </Tabs>)
                                    }}/> */}
                            
                                    {/* <Route path="/equipment/?id=1WallthicknessLoss" component={}/> */}
                                    <Redirect to='/equipment/hotMap'/>
                                </Switch>
                            {/* </Suspense> */}
                        </div>
                    </Content>
                </Layout>
            </Layout>
        </SeoContainer>
    )
}
export default Equipment